#include "stdafx.h"
#include "DatePickerExample.h"

void DatePickerExample::loadFile(const String& fileName, FCView *view){
    FCUIXml::loadFile(fileName, view);
    //获取第二页
      FCTabPage *tabPage = getTabPage(L"TabPage2");
      FCDateTimePicker *datePicker2 = new FCDateTimePicker();
    FCPoint point = {100,100};
    datePicker2->setLocation(point);
    FCSize size = {100,20};
    datePicker2->setSize(size);
      tabPage->addView(datePicker2);

      FCButton *button1 = getButton(L"Button");
      button1->addEvent((FCTouchEventCallBack*)this, FCEventID_Click, this);
}

void DatePickerExample::callTouchEvent(String eventName, Object sender, FCTouchInfo touchInfo, Object invoke){
    FCDateTimePicker *datePicker = (FCDateTimePicker*)findView(L"DatePicker");
    String text = datePicker->getText();
}
